﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Controls_Menu : System.Web.UI.UserControl
{
    protected int cateID;
    protected int newsID;
    protected void Page_Load(object sender, EventArgs e)
    {
        lblDate.Text = AppUtils.ReadDay(DateTime.Now);

        NewsUtils.CheckUrl(ref cateID, ref newsID);
        
        string url = Request.Url.ToString().ToLower();
        if (url.IndexOf("/doi-song/") > 0)
        {
            cateID = 39;
            return;
        }
        if (url.IndexOf("/van-hoa/") > 0)
        {
            cateID = 40;
            return;
        }
        if (url.IndexOf("/gioi-tre/") > 0)
        {
            cateID = 41;
            return;
        }
        if (url.IndexOf("/the-thao/") > 0)
        {
            cateID = 42;
            return;
        }
        if (url.IndexOf("/hoc-duong/") > 0)
        {
            cateID = 43;
            return;
        }
        if (url.IndexOf("/chuyen-nghe/") > 0)
        {
            cateID = 44;
            return;
        }
        if (url.IndexOf("/nghien-cuu-trao-doi/") > 0)
        {
            cateID = 45;
            return;
        }
        if (url.IndexOf("slide.html") > 0 || url.IndexOf("/phat-thanh-song-tre/") > 0 || url.IndexOf("/video/") > 0)
        {
            cateID = 1001;
            return;
        }
        if (url.IndexOf("contact.html") > 0)
        {
            cateID = 1002;
            return;
        }
        if (url.IndexOf("/gioi-thieu/") > 0)
        {
            cateID = 1003;
            return;
        }
    }
}